package pta.newch04.ex14;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int year = scanner.nextInt();
        int month = scanner.nextInt();
        int day = scanner.nextInt();

        Birthday birthday = new Birthday(year, month, day);
        System.out.println("age=" + birthday.getAge());
    }
}

class Birthday {
    private int year;
    private int month;
    private int day;

    public Birthday(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }
    public int getYear() {
        return year;
    }
    public void setYear(int year) {
        this.year = year;
    }
    public int getMonth() {
        return month;
    }
    public void setMonth(int month) {
        this.month = month;
    }
    public int getDay() {
        return day;
    }
    public void setDay(int day) {
        this.day = day;
    }
    public int getAge() {
        int baseYear = 2017;
        int baseMonth = 12;
        int baseDay = 25;
        int age = baseYear - year;
        if (month > baseMonth || (month == baseMonth && day > baseDay)) {
            age--;
        }
        return age;
    }
}
